package common;

import java.io.*;

public class Utils {
    public static final String unit_url = "jdbc:kbase://10.120.146.168/抽取依托领域知识库";//指定服务器地址和数据库名称
    public static final String area_code_url ="jdbc:kbase://10.120.146.174/CSYD_M";
    public static final String indicator_list_url = "jdbc:kbase://10.120.146.220/";
    public static final String yearbook_priority_url = "jdbc:kbase://10.120.146.220/CSYD_F";
    public static final String formal_url = "jdbc:kbase://10.120.146.220/CSYD_M";
    public static final String driver = "com.kbase.jdbc.Driver";// 指定连接类型
    public static final String user = "DBOWN";//服务器用户名
    public static final String password = "";//服务器密码
    public static final String password_174 = "cnkicsyd174@2019";//服务器密码
    public static final String password_220="cnkicsyd220@2022";
    public static int getFileLineNum(String filePath) throws IOException {
        FileReader fileReader=new FileReader(filePath);
        LineNumberReader lineNumberReader=new LineNumberReader(fileReader);
        lineNumberReader.skip(Long.MAX_VALUE);
        int lineNumber=lineNumberReader.getLineNumber();
        return lineNumber;
    }

    public static void main(String[] args) throws IOException {
//        setTable_names();
//        HashMap<String,Integer> file_name_lines=new HashMap<String,Integer>();
//        for(int i=0;i<= table_names.size()-1;i++){
//            String fileName="C:\\Users\\ts647\\Desktop\\formal\\"+table_names.get(i);
//            file_name_lines.put(table_names.get(i),getFileLineNum(fileName));
//            System.out.println(table_names.get(i)+"\t"+getFileLineNum(fileName));
//        }
//        Set<String> names=file_name_lines.keySet();
//        for (String name : names){
//            System.out.println(name+"\t"+file_name_lines.get(name));
//        }
    }

}

